package com.example.demo.util;

import org.apache.commons.lang3.time.DateUtils;

import java.util.Date;

public class DateUtil {

    public static long time_stamp(String time){
        Date parseDate = null;
        try {
            parseDate = DateUtils.parseDate(time.trim(), "yyyy-MM-dd hh:mm:ss");
        } catch (java.text.ParseException e) {
            e.getStackTrace();
        }
        long times = parseDate.getTime();
        return times;
    }
}
